<template>
	<view class="flex-col page">
		<view class="flex-col group_8">
			<view class="flex-row  ">
				<image src="/static/images/zcdggh.png" class="image_9" @click="gotopurchase" />
				<image src="/static/images/sgjxgt.png" class="image_9" @click="gotobuild" />
				<image src="/static/images/clqd.png" class="image_9" @click="gotolist" />
			</view>
			<view class="flex-col group_10">
				<view class="flex-col list" v-if="isExistence != '0'">
					<view class="flex-col list-item">
						<view class="flex-row group_11">
							<image :src="$IMG_URL + '16557867934145430912.png'" class="image_8" />
							<text class="text_11">业主需求提示</text>
						</view>
						<text class="text_13" v-if="foremanReply!=''">
							{{foremanReply}}
						</text>
						<u-empty style="height: 22vh;" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"
							v-else>
						</u-empty>
					</view>
					<!--  -->
					<view class="flex-col list-item">
						<view class="flex-row group_11">
							<image :src="$IMG_URL + '16557867934145430912.png'" class="image_8" />
							<text class="text_11">当前动态进度</text>
						</view>
						<view class="text_list flex-col">
							<text class="text_16">总计划工期：{{planTime}}</text>
							<text class="text_17">施工阶段：{{constructionPlanName}}</text>
							<text class="text_18">当前工序进度：{{completionSchedule}}%</text>
							<text class="text_19">预计完成时间：{{actualEndTimeYJ}}</text>
							<view class="flex-row group_13">
								<text class="text_20" v-if="delayTime != null">已延期：{{delayTime}}个工作日</text>
								<text class="text_20" v-else>已延期：0个工作日</text>
								<text class="text_21" v-if="delayTime != null">
									<navigator url="/pages/foreman/delay/delay">查看原因</navigator>
								</text>
							</view>
							<text class="text_22">总计划工期延期至:{{actualEndTime}}</text>
						</view>
					</view>
				</view>
				<view v-else>
					<u-empty style="height: 40vh;" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
					</u-empty>
				</view>
				<!--  -->
				<view class="flex-col section_5">

					<view class="flex-col">
						<view class="justify-center section_6">
							<text class="text_23">动态施工进度</text>
							<text class="text_24" @click="editClick">编辑</text>
						</view>
						<view class="flex-col section_18">
							<view v-if="this.isExistence == '0'">
								<u-empty style="height: 40vh;" mode="data"
									icon="http://cdn.uviewui.com/uview/empty/data.png">
								</u-empty>
							</view>
							<view v-else>
								<shop-project :list="activeList"></shop-project>
							</view>

						</view>
					</view>
					<!-- <text class="text_57">*拒绝原因：刚刚工还是可以的，希望可以加快进度。</text> -->
				</view>
				<!--  -->
				<view class="flex-col section_16">
					<view class="flex-col">
						<view class="justify-center section_17">
							<text class="text_58">标准施工进度</text>
							<text class="text_59" @click="edit">编辑标准计划进度</text>
						</view>
						<view class="flex-col group_25" v-if="isExistence != '0'">
							<view class="justify-between">
								<text class="text_60">总施工时间：</text>
								<text class="text_61">{{actualTime}}</text>
							</view>
							<view class="justify-between group_27">
								<text class="text_62">总工时：</text>
								<text class="text_63">{{sumHours}}个工作日</text>
							</view>
						</view>
					</view>
					<view class="flex-col section_18">
						<view v-if="isExistence == '0'">
							<shop-project :list="otherlist"></shop-project>
						</view>
						<view v-else>
							<shop-project :list="BZlist"></shop-project>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				list_ePEWedol: [null, null],
				BZlist: [],
				activeList: [],
				otherlist: [],
				planTime: '',
				constructionPlanId: '',
				constructionPlanName: "",
				actualEndTimeYJ: '',
				completionSchedule: '',
				delayTime: '',
				actualEndTime: '',
				sumHours: '',
				isExistence: "",
				projectId: '',
				foremanReply: "",
				actualTime: ''
			};
		},
		created() {
			this.getJD();
			uni.startPullDownRefresh();
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		methods: {
			gotopurchase() {
				uni.navigateTo({
					url: '/pages/foreman/purchase/purchase'
				})
			},
			gotobuild() {
				uni.navigateTo({
					url: '/pages/onSite/onSiteIndex/buildImg/buildImg?ordersId=' + uni.getStorageSync('ordersId')
				})
			},
			gotolist() {
				uni.navigateTo({
					url: '/pages/foreman/checklist/checklist?ordersId=' + uni.getStorageSync('ordersId')
				})
			},
			edit() {
				uni.navigateTo({
					url: 'pages/foreman/editPlan/editPlan'
				})
			},
			editClick() {
				this.$emit('editClick', 'edit')
				// 点击编辑 跳转到进度

			},
			getJD() {
				const projectId = uni.getStorageSync('projectId');
				this.$http('onsite.schedule', {
					projectId: projectId
				}).then(res => {
					// console.log(res, '项目详情')
					if (res.code == 200) {
						this.projectId = res.data.projectId;
						this.planTime = res.data.planTime;
						this.actualTime = res.data.actualTime;
						this.constructionPlanName = res.data.constructionPlanName;
						this.completionSchedule = res.data.completionSchedule;
						this.delayTime = res.data.delayTime;
						this.actualEndTimeYJ = res.data.actualEndTimeYJ;
						this.actualEndTime = res.data.actualEndTime;
						this.isExistence = res.data.isExistence;
						if (res.data.sumHours != null) {
							this.sumHours = res.data.sumHours;
						} else {
							this.sumHours = 0
						}
						if (res.data.constructionPlanList != null) {
							const arr = res.data.constructionPlanList;
							// 标准 计划
							this.BZlist = arr;
							this.activeList = arr;
							this.otherlist = arr
						} else {

						}


					} else {
						uni.showToast({
							icon: "error",
							title: res.msg
						})
					}
				})

				// 获取业主需求提示
				let ordersId = uni.getStorageSync('ordersId');
				let inspectionFrequencyId = uni.getStorageSync('inspectionFrequencyId');
				this.$http('common.getInfolist', {
					ordersId: ordersId,
					type: '5',
					inspectionFrequencyId: inspectionFrequencyId
				}).then(res => {
					if (res.code == 200) {
						this.foremanReply = res.data.hint
					}
				})
			}
		},
	};
</script>

<style scoped lang="scss">
	.list-item {
		padding: 0rpx 24rpx 20rpx;
		background-color: #ffffff;
		border-radius: 16rpx;
	}

	.group_11 {
		padding: 30rpx 0;
		display: flex;
		align-items: center;
		border-bottom: solid 1rpx #eeeeee;

	}

	.text_13 {
		margin-top: 32rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
		text-align: left;
	}

	.group_14 {
		margin-left: 65rpx;
		align-self: flex-start;
		width: 435rpx;
	}

	.group_16 {
		margin-left: 34rpx;
		margin-top: 16rpx;
		align-self: flex-start;
		width: 463rpx;
	}

	.group_17 {
		margin-top: 15rpx;
		height: 51rpx;
	}

	.equal-division {
		margin-left: 134rpx;
		margin-top: 20rpx;
		align-self: flex-start;
		width: 563rpx;
	}

	.image_8 {
		margin-top: 6rpx;
		width: 26rpx;
		height: 16rpx;
	}

	.text_11 {
		margin-left: 12rpx;
		color: #333333;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		display: flex;
		align-items: center;
		height: 100%;
	}

	.image_11 {
		margin-left: 111rpx;
		margin-top: -51rpx;
		flex-shrink: 0;
		align-self: flex-start;
		width: 24rpx;
		height: 32rpx;
	}

	.equal-division-item {
		padding: 10rpx 0;
	}

	.group_19 {
		padding: 8rpx 0;
		width: 200rpx;
		position: relative;
	}

	.group_20 {
		padding: 8rpx 0;
		width: 102rpx;
		position: relative;
	}

	.section_9 {
		background-image: linear-gradient(90deg, #9ae8fd66 0%, #9ae8fd66 1.6%, #12c1f066 90.4%, #12c1f066 100%);
		width: 200rpx;
	}

	.text-wrapper {
		padding: 3rpx 0;
		background-color: #09c7f4;
		box-shadow: 0px 0px 8rpx 0px #0cc7f44d;
		border-radius: 12rpx;
		min-width: 44rpx;
		position: absolute;
		right: 56rpx;
		top: 0;
	}

	.section_11 {
		background-image: linear-gradient(90deg, #69e3c066 0%, #69e3c066 2.3%, #0bc89266 93.6%, #0bc89266 100%);
		width: 200rpx;
		height: 8rpx;
	}

	.text-wrapper_1 {
		padding: 3rpx 0;
		background-color: #cccccc;
		border-radius: 12rpx;
		width: 44rpx;
		position: absolute;
		left: 0;
		top: 0;
	}

	.section_12 {
		background-image: linear-gradient(90deg, #ffc17466 0%, #ffc17466 2.3%, #ff9d2366 93.6%, #ff9d2366 100%);
		width: 200rpx;
		height: 8rpx;
	}

	.section_13 {
		background-image: linear-gradient(90.5deg, #a3c3ff66 0%, #a3c3ff66 -7.71%, #1d6aff66 61.16%, #1d6aff66 100%);
		width: 102rpx;
		height: 8rpx;
	}

	.section_10 {
		background-image: linear-gradient(90deg, #9ae8fd 0%, #9ae8fd 1.6%, #12c1f0 90.4%, #12c1f0 100%);
		width: 100rpx;
		height: 8rpx;
	}

	.text_33 {
		color: #666666;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.text_35 {
		color: #666666;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.text_25 {
		color: #ffffff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_29 {
		color: #ffffff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_45 {
		color: #666666;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.text_51 {
		color: #666666;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.text_47 {
		color: #f6f7f9;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_53 {
		align-self: flex-start;
		color: #ffffff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_37 {
		color: #ffffff;
		font-size: 16rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 18rpx;
	}

	.text_39 {
		color: #ffffff;
		font-size: 16rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 18rpx;
	}

	.text_41 {
		color: #ffffff;
		font-size: 16rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 18rpx;
	}

	.text_43 {
		color: #ffffff;
		font-size: 16rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 18rpx;
	}

	.group_15 {
		padding: 6rpx 0 25rpx;
		background-image: url($IMG_URL+'16557862409591999109.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
		margin-right: 10px;
		width: 156rpx;
		height: 92rpx;
	}

	.group_18 {
		margin-top: 27rpx;
	}

	.text_27 {
		margin-top: 5rpx;
		color: #ffffff;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.text_31 {
		margin-top: 5rpx;
		color: #ffffff;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.section_14 {
		margin-left: 10rpx;
		margin-top: 17rpx;
		align-self: stretch;
	}

	.section_15 {
		margin-top: 17rpx;
	}

	.text_49 {
		margin-top: 5rpx;
		color: #f6f7f9;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.text_55 {
		margin-top: 5rpx;
		color: #ffffff;
		font-size: 20rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 23rpx;
	}

	.page {
		padding-bottom: 64rpx;
		background-color: #f6f7f9ff;
		height: 100%;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
	}

	.section_1 {
		padding: 7rpx 12rpx 30rpx;
		background-image: url($IMG_URL+'16557870724016329987.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.group_8 {
		position: relative;
		margin-top: 16rpx;
	}

	.group_3 {
		margin-top: 24rpx;
		padding: 0 19.5rpx 3.5rpx;
		position: relative;
	}

	.section_2 {
		margin: 24.5rpx 9rpx 0;
		padding: 0 43rpx 76rpx;
		background-image: url($IMG_URL+'16557870724030238158.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.group_9 {
		margin-left: 16rpx;
		margin-right: 40rpx;
		padding-bottom: 4rpx;
	}

	.image-wrapper {
		margin-left: 20rpx;
	}

	.group_10 {}

	.image {
		width: 33rpx;
		height: 20rpx;
	}

	.group_1 {
		margin-right: 60.5rpx;
	}

	.image_4 {
		position: absolute;
		left: 19.5rpx;
		bottom: 0;
		width: 21rpx;
		height: 36rpx;
	}

	.text {
		color: #333333;
		font-size: 36rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 43rpx;
	}

	.group_4 {
		padding: 47rpx 0 24rpx;
		border-bottom: solid 1rpx #ffffff3d;
	}

	.group_6 {
		margin-top: 28rpx;
	}

	.text_4 {
		margin-top: 18rpx;
		align-self: flex-start;
		color: #ffffff;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.group_7 {
		margin-top: 22rpx;
	}

	.text_7 {
		margin-top: 4rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_8 {
		margin-top: 4rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_9 {
		margin-top: 4rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_10 {
		color: #333333;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.image_7 {
		margin-left: 476rpx;
		width: 280rpx;
		height: 198rpx;
	}

	.list {
		padding: 24rpx 0 20rpx;
	}

	.section_5 {
		padding-bottom: 39rpx;
		background-color: #ffffff;
		border-radius: 16rpx;
	}

	.section_16 {
		margin-top: 20rpx;
		padding-bottom: 32.5rpx;
		background-color: #ffffff;
		border-radius: 16rpx;
	}

	.image_1 {
		margin: 3.5rpx 0 2.5rpx;
		width: 85rpx;
		height: 18rpx;
	}

	.group_2 {
		margin-left: 175rpx;
	}

	.image_6 {
		align-self: center;
		width: 26rpx;
		height: 26rpx;
	}

	.text_2 {
		color: #ffffff;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.text_3 {
		margin-top: 13rpx;
		color: #ffffff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_5 {
		color: #ffffff;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.text_6 {
		margin-left: 14.5rpx;
		color: #ffffff;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.list-item:last-of-type {
		margin-top: 20rpx;
	}

	.text_57 {
		margin-left: 24rpx;
		margin-top: 41rpx;
		align-self: flex-start;
		color: #ff371d;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.section_18 {
		margin-left: 24rpx;
		// margin-top: 57rpx;
		overflow: hidden;
		background-image: url($IMG_URL+'16557870745085817645.png');
		background-position: 8.5% 0%;
		background-size: 23.5% 26%;
		background-repeat: no-repeat;
		height: 400rpx;
	}

	.image_2 {
		width: 14rpx;
		height: 24rpx;
	}

	.image_3 {
		margin: 3.5rpx 0 2.5rpx 15.5rpx;
		width: 55rpx;
		height: 18rpx;
	}

	.image_5 {
		flex-shrink: 0;
		border-radius: 50%;
		width: 96rpx;
		height: 96rpx;
	}

	.text_1 {
		margin-left: 32rpx;
		margin-top: 19rpx;
		color: #ffffff;
		font-size: 36rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 43rpx;
	}

	.section_6 {
		padding: 0rpx 23rpx;
		height: 88rpx;
		background-image: url($IMG_URL+'16557870741685852220.png');
		background-size: 100% 100%;
		background-repeat: no-repeat;
		position: relative;
	}

	.section_7 {
		margin-left: 24rpx;
		margin-top: 40.5rpx;
		overflow: hidden;
		background-image: url($IMG_URL+'16557870743796900615.png');
		background-position: 8.5% 0%;
		background-size: 23.5% 26%;
		background-repeat: no-repeat;
		height: 359.5rpx;
	}

	.section_17 {
		padding: 0rpx 25rpx;
		height: 88rpx;
		background-image: url($IMG_URL+'16557870741685852220.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
		position: relative;
	}

	.group_25 {
		padding: 30rpx 23rpx 0 24rpx;
	}

	.text_23 {
		color: #191919;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		display: flex;
		align-items: center;
		height: 100%;
	}

	.text_24 {
		color: #1d6aff;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		position: absolute;
		display: flex;
		align-items: center;
		height: 100%;
		right: 23rpx;
		top: 50%;
		transform: translateY(-50%);
	}

	.text_58 {
		color: #191919;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		display: flex;
		align-items: center;
		height: 100%;
	}

	.text_59 {
		color: #1d6aff;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		position: absolute;
		right: 25rpx;
		top: 26rpx;
	}

	.group_27 {
		margin-top: 33rpx;
	}

	.section_19 {
		padding: 6rpx 0 25rpx;
		background-image: url($IMG_URL+'16557862442321253206.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
		width: 156rpx;
		height: 92rpx;
	}

	.section_8 {
		padding: 6rpx 0 25rpx;
		background-image: url($IMG_URL+'16557870743815730126.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
		width: 156rpx;
		height: 92rpx;
	}

	.text_60 {
		margin-bottom: 6rpx;
		color: #666666;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_61 {
		margin-top: 6rpx;
		color: #191919;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_62 {
		color: #666666;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_63 {
		color: #191919;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.view_40 {
		padding: 19rpx 0 12rpx;
		background-image: url($IMG_URL+'16557862442352586729.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.view_41 {
		padding: 19rpx 0 12rpx 6rpx;
		background-image: url($IMG_URL+'16557862442352586729.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.view_20 {
		padding: 19rpx 0 12rpx;
		background-image: url($IMG_URL+'16557870743832931439.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.view_21 {
		padding: 19rpx 0 12rpx 6rpx;
		background-image: url($IMG_URL+'16557870745014097508.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.text_16 {
		margin-top: 12rpx;
		align-self: flex-start;
		color: #333333;
		font-size: 26rpx;
		font-family: '.AppleSystemUIFont';
	}

	.text_17 {
		align-self: flex-start;
		color: #333333;
		font-size: 26rpx;
		font-family: '.AppleSystemUIFont';
	}

	.text_18 {
		align-self: flex-start;
		color: #333333;
		font-size: 26rpx;
		font-family: '.AppleSystemUIFont';
	}

	.text_19 {
		align-self: flex-start;
		color: #333333;
		font-size: 26rpx;
		font-family: '.AppleSystemUIFont';
	}

	.group_13 {}

	.text_20 {
		color: #333333;
		font-size: 26rpx;
		font-family: '.AppleSystemUIFont';
	}

	.text_21 {
		margin-left: 39rpx;
		color: #1c4ca8;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
	}

	.text_22 {
		align-self: flex-start;
		color: #333333;
		font-size: 26rpx;
		font-family: '.AppleSystemUIFont';
	}

	.text_list text {
		line-height: 50rpx;
	}

	.positionBtn {
		width: 100%;
		height: 150rpx;
		display: flex;
		justify-content: space-between;
		position: absolute;
		top: 2%;
	}

	.positionBtn view {
		width: 33%;
	}

	.image_9 {
		width: 30%;
		height: 148rpx;
		margin: 0 10rpx;
	}
</style>
